#ifndef MAINCONTROLLER_H
#define MAINCONTROLLER_H
#include "mainwindow.h"
#include "userhome.h"
#include "usermanagement.h"
#include "changeview.h"
#include "register.h"
#include "insertproduck.h"
#include "homefind.h"

class MainController
{
public:
    MainController();
    static MainController *getMainController();
    void initMainWindow(MainWindow *m);
    void showMainWindow();
    void hideMainWindow();
    void showUserHome();
    void hideUserHome();
    void showUserManagement();
    void hideUserManagement();

    //修改界面
    void showChangView();
    void hideChangView();
    void deleteChangView();
    void showRegister();


    //用户界面
    void showinsert();
    void deleteinsert();

    //
    void hideRegister();

    //查询
//    void showFind();
//    void deleteFind();

private:
    static MainController *m_instance;
    MainWindow *m_mainwindow;
    UserHome *m_userhome;
    UserManagement *m_usermanagement;
    ChangeView *m_changview;
    Register *m_register;
    insertproduck *h_insert;
//    HomeFind *h_find;

};

#endif // MAINCONTROLLER_H
